package org.easymodelers.gmf.creator.impl;

import java.io.IOException;
import java.util.List;

import org.easymodelers.gmf.creator.GmfGraphCreator;
import org.easymodelers.gmf.utils.ModelsManager;
import org.easymodelers.modeler.data.ModelerDefinition;
import org.easymodelers.processing.ModelerUpdate;
import org.eclipse.gmf.gmfgraph.Canvas;
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;

public class GenericGmfGraphCreator extends AbstractGenericGmfCreator<Canvas> implements GmfGraphCreator {

	protected ModelsManager createModelsManager(String modelPath) {
		Canvas canvas = GMFGraphFactory.eINSTANCE.createCanvas();
		return new ModelsManager(canvas);
	}

	protected Canvas getRootEObject(ModelsManager modelsManager) {
		return modelsManager.getCanvas();
	}

	public void registerDefaultElementDefinitionHandlers() {
	}

	public List<ModelerUpdate> createGmfGraph(String modelPath, ModelerDefinition modeler)	throws IOException {
		return createGmfModel(modelPath, modeler);
	}

}
